#pragma once
#include "Main.h"


class Image{//16 bytes

public:
	BYTE *ImageData; //4
	GLuint TexID;//4
	unsigned int Width; //4
	unsigned int Height; //4

	Image(){ImageData = NULL;};
	void Unload(){glDeleteTextures(1,&TexID);delete ImageData;}
	void Load(string Filename);
	void Depalette(BYTE *in, BYTE *out,BYTE *Palette);
	void Defilter(BYTE *in,BYTE *out,int BPP);
	void ConvertToRGBA(int pix,BYTE *in, BYTE *out);
	void operator =(Image *i){
		Width = i->Width;
		Height = i->Height;
		ImageData = i->ImageData;
		TexID = i->TexID;
	}
	const unsigned char* getImageData()const;
};
